<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="utf-8">
	<title>Wireframe - Three.js Docs</title>
	<meta name="viewport" content="width=device-width, user-scalable=no, minimum-scale=1.0, maximum-scale=1.0">
	<script src="../scripts/highlight.min.js"></script>
	<link type="text/css" rel="stylesheet" href="../styles/highlight-three.css">
	<link type="text/css" rel="stylesheet" href="../styles/page.css">
</head>
<body>
		<p class="inheritance" translate="no"><a href="EventDispatcher.html">EventDispatcher</a> → <a href="Object3D.html">Object3D</a> → <a href="Mesh.html">Mesh</a> → </p>
	<h1 translate="no">Wireframe</h1>
		<section>
			<header>
				<div class="class-description"><p>A class for creating wireframes based on wide lines.</p>
<p>This module can only be used with <a href="WebGLRenderer.html">WebGLRenderer</a>. When using <a href="WebGPURenderer.html">WebGPURenderer</a>,
import the class from <code>lines/webgpu/Wireframe.js</code>.</p></div>
				<h2>Code Example</h2>
				<div translate="no"><pre><code class="language-js">const geometry = new THREE.IcosahedronGeometry();
const wireframeGeometry = new WireframeGeometry2( geo );
const wireframe = new Wireframe( wireframeGeometry, material );
scene.add( wireframe );
</code></pre></div>
			</header>
			<article>
				<h2 class="subsection-title">Import</h2>
				<p><span translate="no">Wireframe</span> is an addon, and must be imported explicitly, see <a href="https://threejs.org/manual/#en/installation" target="_blank" rel="noopener">Installation#Addons</a>.</p>
				<pre><code class="language-js">import { Wireframe } from 'three/addons/lines/Wireframe.js';</code></pre>
				<div class="container-overview">
					<h2>Constructor</h2>
					<h3 class="name name-method" id="Wireframe" translate="no">new <a href="#Wireframe">Wireframe</a><span class="signature">( geometry : <span class="param-type"><a href="LineSegmentsGeometry.html">LineSegmentsGeometry</a></span>, material : <span class="param-type"><a href="LineMaterial.html">LineMaterial</a></span> )</span> </h3>
					<div class="method">
						<div class="description">
							<p>Constructs a new wireframe.</p>
						</div>
						<table class="params">
							<tbody>
								<tr>
									<td class="name">
										<strong>geometry</strong>
									</td>
									<td class="description last">
										<p>The line geometry.</p>
									</td>
								</tr>
								<tr>
									<td class="name">
										<strong>material</strong>
									</td>
									<td class="description last">
										<p>The line material.</p>
									</td>
								</tr>
							</tbody>
						</table>
					</div>
				</div>
				<h2 class="subsection-title">Properties</h2>
				<div class="member">
					<h3 class="name" id="isWireframe" translate="no">.<a href="#isWireframe">isWireframe</a><span class="type-signature"> : boolean</span> <span class="type-signature">(readonly) </span></h3>
					<div class="description">
						<p>This flag can be used for type testing.</p>
						<p>Default is <code>true</code>.</p>
					</div>
				</div>
				<h2 class="subsection-title">Methods</h2>
					<h3 class="name name-method" id="computeLineDistances" translate="no">.<a href="#computeLineDistances">computeLineDistances</a><span class="signature">()</span><span class="type-signature"> : <a href="Wireframe.html">Wireframe</a></span> </h3>
					<div class="method">
						<div class="description">
							<p>Computes an array of distance values which are necessary for rendering dashed lines.
For each vertex in the geometry, the method calculates the cumulative length from the
current point to the very beginning of the line.</p>
						</div>
						<dl class="details">
							<dt class="tag-returns"><strong>Returns:</strong> A reference to this instance.</dt>
						</dl>
					</div>
				<h2 class="subsection-title">Source</h2>
				<p>
					<a href="https://github.com/mrdoob/three.js/blob/master/examples/jsm/lines/Wireframe.js" translate="no" target="_blank" rel="noopener">examples/jsm/lines/Wireframe.js</a>
				</p>
			</article>
		</section>
<script src="../scripts/linenumber.js"></script>
<script src="../scripts/page.js"></script>
</body>
</html>